package org.smart4j.aopdemo.custom;

import org.smart4j.aopdemo.simple.GreetingImpl;

import java.util.ArrayList;
import java.util.List;

public class Client {

    public static void main(String[] args){
        List<Proxy> proxyList = new ArrayList<Proxy>();
        proxyList.add(new BeforeProxy());
        proxyList.add(new AfterProxy());
        proxyList.add(new EndProxy());

        ProxyManager proxyManager = new ProxyManager(GreetingImpl.class, proxyList);
        GreetingImpl greeting = proxyManager.createProxy();
        greeting.sayHello("Jack");

    }
}
